package com.jmu.content.controller.user;


import com.jmu.content.pojo.ChargeStation;
import com.jmu.content.result.Result;
import com.jmu.content.service.ChargeStationService;
import com.jmu.content.vo.ChargeStationUserVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fems
 * @since 2024-05-06
 */
@RestController("userChargeStationController")
@RequestMapping("/user/charge-station")
public class ChargeStationController {

    @Autowired
    ChargeStationService chargeStationService;

    @GetMapping
    @ApiOperation("查询充电站列表")
    @Cacheable(cacheNames = "stationCache",key = "0")
    public Result<List> getAll(){
        List<ChargeStationUserVO> list = chargeStationService.listBatchPrice();
        return Result.success(list);
    }


}

